package cn.jsj.dispose;

import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
/**
 * 查看律师提成详情和付款实际情况处理类
 * @author LI
 *
 */
 public class SearchDetailRolety extends javax.servlet.http.HttpServlet implements javax.servlet.Servlet {
	 public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {

		 // 获得合同号
		 String contractId=request.getParameter("contractId");

		 //获取付款实际情况
		 cn.jsj.dao.TblPayDetailDAO tpdd=new cn.jsj.dao.TblPayDetailDAO();
		 String payDetailInfo=tpdd.getPayDetail(contractId);

		//获得提成详情
		cn.jsj.dao.TblRoyaltyInfoDAO trid=new cn.jsj.dao.TblRoyaltyInfoDAO();
		String detailRoyalty=trid.getRoyaltyDetail(contractId);

		//合并为一个字符串
		String result=payDetailInfo+"|"+detailRoyalty;
		//输出流
		java.io.PrintWriter out=response.getWriter();

		out.println("{message:'"+result+"'}");
		out.flush();
		out.close();
	}
	 public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		doGet(request,response);
	}
}